package com.foreknow.demo;

/**
 * 逻辑运算符
 */
public class LogicDemo {
    public static void main(String[] args) {
//        int a = 5;
//        int b = 3;
//        int c = 2;
//        boolean x1 = (a > b) && (b > c);
//        boolean x2 = (a > b) && (b < c);
//
//        boolean x3 = (a > b) || (b > c);
//        boolean x4 = (a > b) || (b < c);
//
//        boolean x5 = !(a > b);
//        System.out.println(x1);
//        System.out.println(x2);
//        System.out.println(x3);
//        System.out.println(x4);
//        System.out.println(x5);

        int i = 5;
        boolean x = (i++ >5) && (++i <6);
        System.out.println(x);
        System.out.println(i);
    }
}
